<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!--[if IE 6 ]> <html class="ie ie6  not-ie7 not-ie8 not-ie9" xmlns="http://www.w3.org/1999/xhtml"  xmlns:fb="http://ogp.me/ns/fb#"  lang="vi-VN"> <![endif]-->
<!--[if IE 7 ]> <html class="ie ie7  not-ie6 not-ie8 not-ie9" xmlns="http://www.w3.org/1999/xhtml"  xmlns:fb="http://ogp.me/ns/fb#"  lang="vi-VN"> <![endif]-->
<!--[if IE 8 ]> <html class="ie ie8  not-ie6 not-ie7 not-ie9" xmlns="http://www.w3.org/1999/xhtml"  xmlns:fb="http://ogp.me/ns/fb#"  lang="vi-VN"> <![endif]-->
<!--[if IE 9 ]> <html class="ie ie9  not-ie6 not-ie7 not-ie8" xmlns="http://www.w3.org/1999/xhtml"  xmlns:fb="http://ogp.me/ns/fb#"  lang="vi-VN"> <![endif]-->

<html class="not-ie6 not-ie7 not-ie8 not-ie9 " xmlns="http://www.w3.org/1999/xhtml"  lang="vi-VN">
<head>
    <meta charset="utf-8">
    <?php echo $this->headTitle('Minimall Mua bán d? dàng',
        $this->placeholder('titleType', 'APPEND'))
        ->setSeparator(' - ')->setAutoEscape(false);  ?>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <?php echo $this->headMeta()
        ->appendHttpEquiv('Content-Type', 'text/html;charset=utf-8')
        ->appendName('keywords', 'Rao v?t, ??ng tin rao v?t, ch? c?a ng??i Vi?t, Mua bán d? dàng,')
        ->appendName('robots', 'index, follow')
        ->appendName('language', 'VN')
        ->appendName('googlebot', 'index, follow, archive')
        ->appendName('tags', 'Rao v?t, qu?ng cáo, mua bán d? dàng');;?>
    <link rel="stylesheet" href="<?php echo $this->basePath(); ?>/templates/front/css/bootstrap.min.css">

    <link rel="stylesheet" href="<?php echo $this->basePath(); ?>/templates/front/css/styles.min.css">
    <!--
   <link rel="stylesheet" href="<?php echo $this->basePath(); ?>/templates/front/css/jNotify.jquery.css">
    <link rel="stylesheet" href="<?php echo $this->basePath(); ?>/templates/front/css/style_response.css">
    -->
    <!--Style respone -->
    <link rel="stylesheet" href="<?php echo $this->basePath(); ?>/templates/front/css/light-theme.css">
    <style>
        /*jNotify*/
        /*****************/
        /** jNotify CSS **/
        /*****************/
        #jNotify {
            position:absolute;
            background:#d8e6fc  url('../images/info.png') no-repeat 15px center;
            color:#35517c;
            border:1px solid #a7c3f0;
            padding:10px;
            padding-left:50px;
            margin:15px;
            z-index:9999;
            -moz-border-radius : 5px;
            border-radius:5px;
            -webkit-border-radius:5px;
        }
        #jNotify a {color:#35517c !important;text-decoration:none;}

        /******************/
        /** jSuccess CSS **/
        /******************/
        #jSuccess {
            position:absolute;
            background:#E6EFC2  url('../images/success.png') no-repeat 15px center;
            color:#264409;
            border:1px solid #C6D880;
            padding:10px;
            padding-left:50px;
            margin:15px;
            z-index:9999;
            -moz-border-radius : 5px;
            border-radius:5px;
            -webkit-border-radius:5px;
        }
        #jSuccess a {color:#264409 !important;text-decoration:none;}



        /****************/
        /** jError CSS **/
        /****************/
        #jError {
            position:absolute;
            background:#FBE3E4  url('../images/error.png') no-repeat 15px center;
            color:#8a1f11;
            border:1px solid #FBC2C4;
            padding:10px;
            padding-left:50px;
            margin:15px;
            z-index:9999;
            -moz-border-radius : 5px;
            border-radius:5px;
            -webkit-border-radius:5px;
        }
        #jError a {color:#8a1f11 !important;text-decoration:none;}

        /** OVERLAY **/
        #jOverlay {
            width:100%;
            height:100%;
            position:fixed;
            top:0;
            left:0;
            z-index:9998
        }
        /*end jNotify*/


        /*style respone*/
        @media (min-width: 768px) and (max-width : 1200px) {

        }

        @media only screen and (min-width : 768px) and (max-width : 992px)   {
            .topic_image img{
                width: 180px;
            }
        }

        /* 768 */

        @media only screen and (min-width : 180px) and (max-width : 768px)   {
            .select_item_per_page{
                margin: -60px 0px 20px 0px;
                float: right;
            }
            #topic-wrapper .topic-item-grid {
                width: 100% !important;
            }
            .topic_image img{
                width: 100%;
            }
        }
        @media only screen and (min-width : 240px) and (max-width : 360px) {
            .radio-inline+.radio-inline, .checkbox-inline+.checkbox-inline {
                margin-top: 0;
                margin-left: 0px;
                padding-left: 10px !important;
            }
        }


    </style>
    <!--Style respone -->
    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
    <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!--[if lt IE 9]>

    <![endif]-->

    <!-- wysyhtml5 -->
    <link rel="stylesheet" type="text/css" href="<?php echo $this->basePath(); ?>/templates/front/js/common/bootstrap-wysihtml.css"/>
    <script src="<?php echo $this->basePath(); ?>/templates/front/js/common/wysihtml5-0.3.0.js"></script>


    <script src="<?php echo $this->basePath(); ?>/templates/front/js/bootstrap-wysihtml5.js"></script>

    <script type="text/javascript" src="<?php echo $this->basePath(); ?>/templates/front/js/fancybox/jquery.fancybox.pack.js"></script>
    <script type="text/javascript">
        window.fbAsyncInit = function () {
            FB.init({
                appId: '509304975858722', // replace your app id here
                status: true,
                cookie: true,
                xfbml: true
            });
        };
        (function (d) {
            var js, id = 'facebook-jssdk', ref = d.getElementsByTagName('script')[0];
            if (d.getElementById(id)) {
                return;
            }
            js = d.createElement('script');
            js.id = id;
            js.async = true;
            js.src = "//connect.facebook.net/en_US/all.js";
            ref.parentNode.insertBefore(js, ref);
        }(document));

        function FBLogin() {
            var host = 'http://' + window.location.host + '/login/fb';

            FB.login(function (response) {
                if (response.authResponse) {
                    window.location.href = host;
                }
            }, {scope: 'email,user_likes,user_birthday,user_hometown,user_photos'});
        }
    </script>
    <link rel="shortcut icon" type="image/png" href="favicon.ico"/>
</head>
<body>
<div id="fb-root"></div>

<?php
$translator = \Velacolib\Utility\Utility::translate();
?>

<div class="navbar navbar-default navbar-fixed-top nav-custom">
    <div class="container-fluid">
        <div class="navbar-header">
            <a href="/" class="navbar-brand">Minimall</a>
            <button class="navbar-toggle" type="button" data-toggle="collapse" data-target="#navbar-main">
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
        </div>
        <div class="navbar-collapse collapse" id="navbar-main">
            <ul class="nav navbar-nav">

            </ul>

            <ul id="nav-user" class="nav navbar-nav navbar-right">
                <?php  echo \Velacolib\Utility\Utility::MenuUserFrontEnd() ; ?>
            </ul>

        </div>
    </div>
</div>


<div id="home" class="container">
    <div class="row-fluid" style="min-height: 505px" >
        <div class="page-header" id="banner">
            <form action="/" method="get" name="search_form" id="">
                <div class="row" style="">
                    <div class="col-lg-4 col-sm-4 col-md-4" style="margin-top: 5px">
                        <input type="text" id="search-input" name="search_val" class="form-control" placeholder="">

                        <div class="loading_absolute">&nbsp</div>
                    </div>
                    <div class="col-lg-4 col-sm-4 col-md-4" style="margin-top: 5px">
                        <select class="form-control" name="search_cat">
                            <option value="0"><?= $translator->translate('all') ?></option>
                            <?php $cat = Velacolib\Utility\Utility::getCategoryArray(); ?>
                            <?php foreach ($cat as $key_cat => $val_cat) { ?>
                                <option value="<?php echo $val_cat->id ?>"><?php echo $val_cat->title ?></option>
                            <?php } ?>
                        </select>
                    </div>
                    <div class="col-lg-4 col-sm-4 col-md-4" style="margin-top: 5px">
                        <div class="input-group">
                            <select class="form-control" name="search_loc">
                                <?php $loc = Velacolib\Utility\Utility::getLocationArray(); ?>
                                <?php foreach ($loc as $k => $c) { ?>
                                    <option value="<?php echo $k ?>"><?php echo $c ?></option>
                                <?php } ?>
                            </select>
                    <span class="input-group-btn">
                      <button class="btn btn-primary" id="send" value="Tìm"
                              type="submit"><?= $translator->translate('Search') ?></button>
                    </span>
                        </div>
                    </div>
                </div>
                <div class="row" style="margin: 10px">
                    <label class="checkbox-inline">
                        <input type="radio" name="search_type" id="inlineCheckbox2"
                               value="0"> <?= $translator->translate('Sell') ?>
                    </label>
                    <label class="checkbox-inline">
                        <input type="radio" name="search_type" id="inlineCheckbox1"
                               value="1"> <?= $translator->translate('Buy') ?>
                    </label>

                </div>
            </form>
        </div>
        <div align="center">
                  <img src="/upload/image/404.jpg"/>
        </div>
    </div>



    <!-- ================================== content body ================================== -->

    <!--<div class="fixed-social">
        <div class="face-like">
            <div class="fb-like" data-href="https://developers.facebook.com/docs/plugins/" data-layout="box_count" data-action="like" data-show-faces="true" data-share="true"></div>
        </div>
        <div class="glus-like">
            <a href="https://twitter.com/share" class="twitter-share-button" data-related="jasoncosta" data-lang="en" data-size="large" data-count="none">Tweet</a>
        </div>

    </div>-->
</div>
<footer id="footer">
    <div class="container" >
        <div class="row ">
            <div class="col-lg-8">
                <div id="menu_footer" >
                    <ul>
                        <?php
                        $page = \Velacolib\Utility\Utility::menu_footer();
                        $countPage = count($page);
                        $i=0;

                        foreach($page as $key=>$item) { $i++; ?>
                            <li>
                                <a href="/page/baiviet/<?=$item->slug?>">
                                    <span><?= $item->title?></span>
                                </a>
                            </li>
                        <?php
                        }
                        ?>

                    </ul>
                </div>


            </div>
            <div class="col-lg-4">
                <h4>Nhận tin qua emails</h4>
                <p>Duyệt tin de dàng qua email!</p>
                <form action="" method="post">
                    <div class="input-group">
                        <input class="form-control" type="email" name="email" >
                    <span class="input-group-btn">
                      <button class="btn btn-success" id="send" value="send" type="submit">Submit</button>
                    </span>
                    </div>
                </form>
            </div>
        </div>
        <div class="row">
            <span id="copyr" >  © 2014  Vela Activation. Ltd. All Rights reserved.</span>
        </div>
    </div>
</footer>

<a href="#" id="toTop" class="btop" style="display: none">    </a>
<script>
    jQuery(document).ready(function() {
        var offset = 220;
        var duration = 500;
        jQuery(window).scroll(function() {
            if (jQuery(this).scrollTop() > offset) {
                jQuery('#toTop').fadeIn(duration);
            } else {
                jQuery('#toTop').fadeOut(duration);
            }
        });

        jQuery('#toTop').click(function(event) {
            event.preventDefault();
            jQuery('html, body').animate({scrollTop: 0}, duration);
            return false;
        })
    });
</script>
<!-- modal login -->
<div class="modal fade" id="modal_login" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header" style="text-align: center;border-bottom: none">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                <h2 style="font-family: Myriad Pro;font-size: 21px;font-weight: 700" class="modal-title" id="myModalLabel">??ng nh?p tài kho?n</h2>
            </div>
            <div class="modal-body">
                <div class="alert alert-info alert-dismissable overlay-loading" style="display: none">
                    Loading.....
                </div>
                <form action="<?php echo $this->url ("login", array('controller' => 'login', 'action' => 'login'))?>" id="loginform" name="login_form" class="form-horizontal require-validate ajax-login" role="form" method="post">
                    <div style="margin-bottom: 25px" class="input-group group_validate">
                        <span class="input-group-addon"><i class="glyphicon glyphicon-user"></i></span>
                        <input req="true" id="login-username" type="text" class="form-control" name="username"
                               placeholder="">
                    </div>

                    <div style="margin-bottom: 25px" class="input-group group_validate">
                        <span class="input-group-addon"><i class="glyphicon glyphicon-lock"></i></span>
                        <input req="true" id="login-password" type="password" class="form-control" name="password" placeholder="">
                    </div>


                    <div class="input-group">
                        <div class="checkbox">
                            <label>
                                <input id="login-remember" type="checkbox"  value="1"> <?=$translator->translate('Remember me')?>
                            </label>
                        </div>
                    </div>


                    <div style="margin-top:10px" class="form-group">
                        <!-- Button -->

                        <div class="col-sm-12 controls">
                            <button id="btn-login" type="submit" class="btn btn-success"> <?=$translator->translate('btn_login')?></button>
                            <button id="btn-fblogin" type="button" onclick="FBLogin()" class="btn btn-primary"> <?=$translator->translate('Login with Facebook')?>
                            </button>

                        </div>
                    </div>


                    <div class="form-group">
                        <div class="col-md-12 control">
                            <div style="border-top: 1px solid#888; padding-top:15px; font-size:85%">
                                <span class="pull-left"><a href="/user/forgotpassword"> <?=$translator->translate('Forgot password')?></a></span>
                               <span class="pull-right">  <?=$translator->translate("You don't have an account?")?>
                                   <a onclick="$('#modal_login').modal('hide')" href="#" data-toggle="modal" data-target="#modal_reg">
                                       <?=$translator->translate('btn_signup')?>
                                   </a>
                               </span>
                            </div>
                        </div>
                    </div>
                </form>
            </div>

        </div>
    </div>
</div>
<!-- end modal login -->

<!-- start modal register -->
<div class="modal fade" id="modal_reg" tabindex="-1" role="dialog" aria-labelledby="modal_reg_label" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header" style="text-align: center;border-bottom: none">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                <h4 style="font-family: Myriad Pro;font-size: 21px;font-weight: 700" class="modal-title" id="modal_reg_label">??ng ký tài kho?n</h4>
            </div>
            <div class="modal-body">
                <form action="<?php echo $this->url ("register", array('controller' => 'register', 'action' => 'register'))?>" method="post" name="form_register" accept-charset="utf-8" class="form require-validate ajax-form"  id="form_register" role="form">

                    <div class="alert alert-info alert-dismissable overlay-loading" style="display: none">
                        <?=$translator->translate('loading')?>.....
                    </div>
                    <div class="row form-group group_validate">
                        <div class="col-xs-12 col-md-12 col-sm-12">
                            <input req="true" type="text" name="name" value="" class="form-control input-lg"  placeholder="H? tên"/>
                        </div>

                    </div>

                    <div class="form-group group_validate">
                        <input req="true" type="text" name="email" value="" class="form-control input-lg"  placeholder=" Email"/>
                    </div>
                    <div  class="form-group group_validate">
                        <input req="true" type="password" name="password" value=""class="form-control input-lg" placeholder="M?t kh?u"/>
                    </div>
                    <div class="form-group group_validate">
                        <input req="true" type="password" name="confirm_password" value="" class="form-control input-lg" placeholder="Nh?p l?i m?t kh?u"/>
                    </div>

                    <button class="btn btn-lg btn-primary btn-block signup-btn" type="submit">
                        <?=$translator->translate('btn_signup')?>
                    </button>
                </form>
            </div>

        </div>
    </div>
</div>
<!-- end modal register -->
<!-- loading -->
<div class="loading" style="display: none">Loading&#8230;</div>
<script src="<?php echo $this->basePath(); ?>/templates/front/js/bootstrap.min.js"></script>
<script src="<?php echo $this->basePath(); ?>/templates/front/js/jNotify.jquery.min.js"></script>

<script src="<?php echo $this->basePath(); ?>/templates/front/js/js_frontend/js_function.js"></script>



<!-- <script  src="js/bootstrap.js"></script>  -->
<link rel="stylesheet" href="<?php echo $this->basePath(); ?>/templates/front/css/jquery-ui.min.css" />
<script src="<?php echo $this->basePath(); ?>/templates/front/js/ajax-jquery-ui.min.js"></script>
<script src="<?php echo $this->basePath(); ?>/templates/front/js/typeahead.min.js"></script>
<script src="<?php echo $this->basePath(); ?>/templates/front/js/js_frontend/frontend_ajax.js"></script>
<script type="text/javascript" src="<?php echo $this->basePath(); ?>/templates/front/js/platform.js">
    {lang: 'vi'}
</script>

</body>
</html>
